
    // 窗口下拉
    window.onwheel = function () {
        if (window.scrollY > 20) {
            document.querySelector("header").classList.add("topFixed")
            document.querySelector("header h1").style.display = "none"
            // console.log(window.scrollY);
            document.querySelector(".shangjt").style.display = "block"
        } else {
            show()
        }
    }
    // 返回顶部
    function xTop() {
        document.body.scrollTop = document.documentElement.scrollTop = 0;
        show()
    }
    // 显示
    function show() {
        document.querySelector("header").classList.remove("topFixed")
        document.querySelector("header h1").style.display = "block"
        document.querySelector(".shangjt").style.display = "none"
    }



    function resize() {
        var width = document.body.offsetWidth || document.documentElement.offsetWidth;
        var rem = width / 30;
        // if (rem > 100) rem = 100;
        document.documentElement.style.fontSize = rem + 'px'
    }
    resize();
    window.onresize = resize;